FROM openjdk:8
MAINTAINER gzkemays
ADD forum-web.jar forum-web.jar
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
ENV JVM_ARGS="-server \
-Xmx1024m \
-Xms1024m \
-Xmn340m \
-Xss256K \
-XX:NewRatio=1 \
-XX:+DisableExplicitGC \
-XX:SurvivorRatio=1 \
-XX:+UseConcMarkSweepGC \
-XX:+UseParNewGC \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCMSCompactAtFullCollection \
-XX:CMSFullGCsBeforeCompaction=0 \
-XX:+CMSClassUnloadingEnabled \
-XX:+UseFastAccessorMethods \
-XX:+UseCMSInitiatingOccupancyOnly \
-XX:CMSInitiatingOccupancyFraction=80 \
-XX:SoftRefLRUPolicyMSPerMB=0"
EXPOSE 8881
ENTRYPOINT java ${JVM_ARGS} -jar forum-web.jar